-
-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add sort option #54
add sort option #54
Conversation
Hi @Daley, thanks for your pull request! There is another one before your PR, can you explain the differences between that one and this one? |
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "serve-index", | |||
"description": "Serve directory listings", | |||
"version": "1.7.3", | |||
"version": "1.7.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please undo this version bump.
#41 seems to sort by a function that is passed. This one just adds the sort by modified date. This one is simpler and the other is more versatile. It's up to you, but I think this function is very much needed |
Will this be merged ? |
It'd be awesome if you could merge in one of the two sort solutions. :) |
I at least need the PR updated with the change request I made. Since I requested the change a year ago and the PR still hasn't been updated, I'm just going to close it. Someone can always open a new PR if they are interested in picking it up and making any changes from review feedback. |
Ah ok, bummer @mrv777 didn't make that correction for you. Since I only needed sorting myself for a specific one-off project, I just manually changed fileSort to the code he used. |
app.use('/', serveIndex("dir", {'icons': true,sort:serveIndex.fileSortWithMTime}));